<?php

    #-------------------------------------------------------------#
	# This file is part of the Tekuna MVC Microframework for PHP. #
	# (c) 2009 Niels Jäckel <niels.jaeckel@tekuna.org>            #
	# Please visit http://tekuna.org/ for more information.       #
	#                                                             #
	# This software is licensed under the MIT License. Please     #
	# view the LICENSE file for the full text of this license.    #
    #-------------------------------------------------------------#


	/**
	 * This exception does not indicate an error. It is just an elegant way to break all remaining
	 * execution paths when a controller is redirected. Within this 'exception bubble' there is
	 * the output of the last redirected controller.
	 */

	class ControllerRedirectException extends TekunaException {

		protected $sControllerOutput = '';


		/**
		 * Creates a new instance of this exception with the
		 * controller output inside.
		 *
		 * @param string $sControllerOutput the actual controller output
		 */

		public function __construct($sControllerOutput) {

			// parent call
			parent :: __construct(NULL, NULL, 0);

			// store the controller output
			$this -> sControllerOutput = $sControllerOutput;
		}


		/**
		 * @return string returns the stored controller output
		 */

		public function getControllerOutput() {

			return $this -> sControllerOutput;
		}
	}
